package xiao_jin.fantastic_journey.core.init;

import net.minecraft.block.Block;
import net.minecraft.item.Items;
import net.minecraft.item.ToolMaterial;
import net.minecraft.recipe.Ingredient;
import net.minecraft.registry.tag.TagKey;

public final class ModToolMaterials {

    public static final ToolMaterial EMERALD = new ToolMaterialBase(1600, 8.5f, 3.0f, ModTags.INCORRECT_FOR_EMERALD_TOOL, 12, Ingredient.ofStacks(Items.EMERALD.getDefaultStack()));

    public static void registerModToolMaterials() {
    }

    public record ToolMaterialBase(
            int durability,
            float miningSpeed,
            float attackDamage,
            TagKey<Block> inverseTag,
            int enchantability,
            Ingredient repairIngredient
    ) implements ToolMaterial {
        @Override
        public int getDurability() {
            return durability;
        }

        @Override
        public float getMiningSpeedMultiplier() {
            return miningSpeed;
        }

        @Override
        public float getAttackDamage() {
            return attackDamage;
        }

        @Override
        public TagKey<Block> getInverseTag() {
            return inverseTag;
        }

        @Override
        public int getEnchantability() {
            return enchantability;
        }

        @Override
        public Ingredient getRepairIngredient() {
            return repairIngredient;
        }
    }
}
